package org.java.innerClass01;

import org.java.innerClass.Destination;

/**
 * nesting a class within a scope
 * 在任意作用域内 创建一个完整的类
 * @author imaginedays
 *
 */
public class Parcel5 {

	private void internalTracking(boolean b){
		if (b) {
			class TrackingSlip{
				private String id;
				public TrackingSlip(String s) {
					id = s;
				}
				
				String getSlip(){
					return id;
				}
			}
			
			TrackingSlip ts = new TrackingSlip("slip");
			String s = ts.getSlip();
			System.out.println(s);
		}
	}
	
	public void track(){
		internalTracking(true);
	}
	
	
	
	public static void main(String[] args) {
		Parcel5 p = new Parcel5();
		p.track();
	}

}
